﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;

namespace SelfHostingATMService
{
    class Program
    {
        static void Main(string[] args)
        {
            ServiceHost host = new ServiceHost(typeof(ATMServiceLibrary.ATMService));
            host.Open();

            Console.WriteLine("ATMServiceLibrary is running in following addresses:");
            Console.WriteLine();

            foreach (var ep in host.Description.Endpoints)
            {
                Console.WriteLine("- {0}", ep.Address);
            }

            Console.WriteLine();
            Console.WriteLine("Press anys key to shutdown the host.");
            Console.ReadLine();
            host.Close();
        }
    }
}
